Skip to content

Content: let viewers pin shared sidebar pages - #2412

Merged
3mdistal merged 7 commits into
mainfrom
codex/content-sidebar-viewer-favorite
Aug 3, 2026
Merged

Content: let viewers pin shared sidebar pages#2412
3mdistal merged 7 commits into
mainfrom
codex/content-sidebar-viewer-favorite

Conversation

@3mdistal

@3mdistal 3mdistal commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Problem

The Content sidebar coupled personal Pin to sidebar / Unpin from sidebar actions to shared edit/manage permission. A view-only collaborator therefore lost the entire overflow menu, even though pinning is private to that person. Viewer rows also shifted because the add-child slot disappeared.

Approach

Separate personal sidebar capability from shared Page authority, preserving current-main pin vocabulary and per-user sidebar ordering. Each live row implementation keeps a stable two-slot action cluster: overflow first, then add-child. When child creation is unavailable, the plus remains visible as a native-disabled, muted control.

What changed

  • Centralized sidebar action availability for personal pinning versus shared edit/manage actions.
  • Applied the permission and alignment boundary to DatabaseSidebarRow and DocumentTreeItem; current-main pinned rows continue through the database-row path.
  • Kept viewer menus limited to Pin/Unpin while retaining existing editor/admin actions.
  • Added focused permission, ordering, keyboard/callback, layout, and editor-regression tests.
  • Added a user-facing Content changelog entry.

Safety

This does not change Page roles or grant shared mutations. Viewers still cannot delete, move, create children, drag, or perform other shared changes. There are no schema, action, application-state, or feature-flag changes.

Verification

  • Exact head: 0cb5102a6e6015e92f8d9368842e4ef8cd45b738; integrated merge base: 60749ec7730dc1d5523c8745e70a27c5b7b65a03.
  • Current main: 64c93b4ed55e0c1fe8b1a4fd1a91210c6e7d212b. Its post-candidate delta is limited to package-release metadata, Netlify ignore script/tests, and Clips player/comment code, classified acceptance-disjoint from Content sidebar and sharing authorization.
  • Complete material diff: eight files, 515 insertions and 22 deletions; SHA-256 e7ec1ca64520fe0748e1892409cffc11ce0fbe65b611c785f88ca6caaf4c06ab.
  • Focused sidebar and viewer-authorization matrix — 62 tests passed across five files.
  • Full Content suite — 2,060 passed, 3 expected failures, 5 skipped; 168 files passed and 1 skipped.
  • Content typecheck — passed.
  • Content product-impact policy — 30 passed.
  • Independent permission review — approved this exact head with no findings; the reviewer additionally passed 23 core sharing-access tests and confirmed the organization-membership resolver grants only viewer authority while editor assertions reject.
  • All nine required checks are green on this exact head: Build, Content DB tests, Content parity, Core integration tests, Fast tests, standalone Chat generation, Lint and format, Plan E2E, and scaffold creation.
  • Authenticated exact-head H1–H3 passed in a freshly claimed Codex in-app browser tab against the task-owned localhost process whose cwd was this exact-head worktree. The viewer workspace row exposed overflow first and a gray native-disabled plus second; its menu contained only Pin to sidebar; pinning created the private Pinned membership whose menu contained only Unpin from sidebar; unpinning restored the observed initial unpinned baseline. The final menu again contained only Pin to sidebar. No shared mutation was exposed or performed. Screenshots are retained in the governing task evidence directory.
  • The localhost preview was stopped after acceptance and port 8080 was verified free.

Review focus

  • A viewer can only perform the personal Pin/Unpin action.
  • The disabled plus preserves alignment and cannot receive focus or invoke child-creation callbacks.
  • Current-main personal sidebar ordering, delete confirmation, opened-database context, and pinned-row routing remain unchanged.
content_product_impact:
  lane: contract_repair
  features:
    - content.feature.find-your-place-again
    - content.feature.make-the-workspace-yours
  capabilities:
    - content.navigation.sidebar
  record_change: none
  proof:
    - pnpm --filter content test
  rationale: The change repairs the personal sidebar permission contract without changing shared Page authority.

@netlify

This comment has been minimized.

@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@3mdistal 3mdistal changed the title Content: let viewers favorite sidebar pages Content: let viewers pin shared sidebar pages Jul 30, 2026
…-viewer-favorite

# Conflicts:
#	templates/content/app/components/editor/database/sidebar.tsx
#	templates/content/app/components/sidebar/DocumentTreeItem.tsx
@3mdistal
3mdistal marked this pull request as ready for review August 1, 2026 12:06
@3mdistal
3mdistal requested a review from steve8708 August 1, 2026 12:06
builder-io-integration[bot]

This comment was marked as outdated.

@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@3mdistal
3mdistal merged commit 8385d4d into main Aug 3, 2026
77 of 81 checks passed
@3mdistal
3mdistal deleted the codex/content-sidebar-viewer-favorite branch August 3, 2026 17:12
@netlify

This comment has been minimized.

@netlify

This comment has been minimized.

@builder-io-integration builder-io-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builder reviewed your changes — looks good ✅

Review Details

Incremental Code Review Summary

The latest PR head keeps the same eight-file sidebar change: shared action availability is centralized, viewer rows expose personal Pin/Unpin independently of shared Page authority, and both database and document-tree rows retain a stable overflow-before-add-child layout. I compared the refreshed diff and surrounding permission/action code against the prior clean review. The three parallel incremental reviews found no new confirmed regressions. One reviewer raised the existing canEdit !== false default semantics for absent optional fields; this is unchanged from the prior reviewed implementation and matches the established Content behavior for legacy/local records, so it is not a new incremental finding and is not resubmitted.

The latest focused tests and server-side checks continue to cover viewer-only menus, private favorite authorization, disabled-plus behavior, role regressions, ordering, and callback safety. No schema, shared authorization, or mutation contract changes were introduced.

🧪 Browser testing: Attempted after this review, but visual verification is infra-unavailable — /content returned 200 and the dev server was healthy, while all browser executors again lacked Chrome automation tools. Role fixtures and server-side viewer pin/unpin checks were prepared and verified for a later rerun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants